﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Bornander.UI.Test
{
    public partial class MenuScreen : UserControl
    {
        public enum ListType
        {
            Album, 
            FormulaOne,
            Panel,
            UserList
        }

        public delegate void ListSelectedHandler(MenuScreen.ListType listType, bool multipleSelectionsEnabled, bool explicitUnselectEnabled);

        public event ListSelectedHandler ListSelected;

        public MenuScreen()
        {
            InitializeComponent();
        }

        private void OnListSelected(ListType listType)
        {
            if (ListSelected != null)
                ListSelected(listType, allowMultipleSelection.Checked, allowExplicitUnselect.Checked);
        }

        private void AlbumListButtonClicked(object sender, EventArgs e)
        {
            OnListSelected(ListType.Album);
        }

        private void F1ListButtonClicked(object sender, EventArgs e)
        {
            OnListSelected(ListType.FormulaOne);
        }

        private void PanelButtonClicked(object sender, EventArgs e)
        {
            OnListSelected(ListType.Panel);
        }
        private void UserListButtonClicked(object sender, EventArgs e)
        {
            OnListSelected(ListType.UserList);
        }
 
    }
}
